package com.h2cloud.Stream;

import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.function.Supplier;

/**
 * @Package: com.h2cloud.Stream
 * @ClassName: test
 * @Author: h2cloud
 * @CreateTime: 2022/8/7 11:41 下午
 * @Description:
 */

@Data
public class test {
	long id;
	int num;
	BigDecimal price;
	String name;
	String category;

	public test(long l, int i, BigDecimal bigDecimal, String name, String category) {
		this.id = id;
		this.num = num;
		this.price = price;
		this.name = name;
		this.category = category;
	}

	public static void main(String[] args) {

	}
}

class NatualSupplier implements Supplier<Long> {
	long n = 0;
	public Long get() {
		n++;
		return n;
	}
}

class LocalDateSupplier implements Supplier<LocalDate> {
	LocalDate start = LocalDate.of(2020, 1, 1);
	int n = -1;

	@Override
	public LocalDate get() {
		n++;
		return start.plusDays(n);
	}
}
